Release Notes for MPLINK™ Object Linker and Utilities
MPLINK Object Linker v4.10
MPLIB™ Object Librarian v4.10
MP2COD COFF to COD File Converter v4.10
MP2HEX COFF to HEX File Converter v4.10
26 January 2007

Table of Contents
  1. Important MPLINK and MPLAB IDE Compatibility Note
  2. New in This Release
  3. Command Line Device Options Supported
  4. Operating System Support List
  5. Known Problems
  6. Customer Support
  1. Important MPLINK and MPLAB IDE Compatibility Note

  2. Due to a change in COFF file format, MPLAB C18 v3.00 and later will not be compatible with versions of MPLINK prior to v4.00 or versions of the MPLAB IDE prior to v7.21.

    MPLINK v4.00 and later will have backward compatibility to earlier versions at the source level only. Any existing object files or libraries compiled with earlier versions of the tools will not link using new versions of the tools. They will need to be recompiled from source.

    If the user attempts to use this release with object files or libraries compiled with earlier versions of MPLAB C18, MPLINK, and MPASM, the error message that will be received will be similar to:

    Error - Coff file format for 'C:\mcc18\lib/c018i.o' is out of date.
    

    If the user attempts to use an old version of MPLINK to link object files or libraries compiled with this release, the error message that will be received will be similar to:

    Error - Coff file format for 'C:\mcc18\lib/c018i.o' does not appear to be a valid COFF file.
    

  3. New in This Release

    • Problems resolved between v4.06.04 and v4.10:

      (22672)
      If there was no place to allocate a zero-length section, the error message "cannot allocate section" would be emitted even though the section required no memory. Now the linker does not attempt to allocate zero-length sections.


      (BIN18-57)
      ICD2 linker scripts were changed for 16F616 and 16HV616 to minimize bank switching overhead. The data memory required was changed from 0x65-0x6F to 0xB5-0xBF.


    • Modifications between v4.06.04 and v4.10:

      Support for MPLAB REAL ICE Instrumented Trace is provided.


      A command line argument, /strip-section, has been added to the linker to allow the user to strip out unwanted empty sections that may automatically be added by the compiler (such as MATH_DATA) or the linker (such as “.cinit”).

      mplink /strip-section <section-name> ...

      Using this feature to remove the “.cinit” section from objects with initialized data can result in unpredictable behavior. In the case of programs with no initialized data, this feature can be used as workaround for SSR 3224 to eliminate the extra 2 bytes used for the length of initialized data.


      See early adopter part support added in the Command Line Device Options below.

    • Modification between v4.06 and v4.06.04:

      This revision of MPLINK Linker included slight modifications to provide beta support for Instrumented Trace using MPLAB IDE and MPLAB REAL ICE In-Circuit Emulator System.

    • Problems resolved between v4.05 and v4.06:

      (22612)
      Combining a typedef name with a 'rom' type qualifier in a declaration would assign the incorrect type if 'rom' followed the typedef name.


    • No linker problems resolved between v4.04 and v4.05.

    • No linker problems resolved between v4.03 and v4.04.

    • Problems resolved between v4.02 and v4.03:

      (25839)
      Linker scripts written for use with MPASM and those written for use with MPLAB C18 have the same names, based on the device or family of devices which they support.
      To help identify which linker scripts should not be used with MPLAB C18, the linker scripts for use with MPASM projects contain the following comment:
      Not intended for use with MPLAB C18. For C18 projects, use the linker scripts
      provided with that product.
    • Problems resolved between v4.01 and v4.02:

      (27261)
      In 16F716.lkr, the definition of memory 'gpr0' overlapped memory 'gprnobnk'. gpr0 was defined as START=0x20 END=0x70.
      The END address is now 0x6F instead.


      (27423)
      ICD2 linker scripts for the following devices were incorrect:
        18f65j10
        18f65j15
        18f66j10
        18f66j15
        18f67j10
        18f85j10
        18f85j15
        18f86j10
        18f86j15
        18f87j10
      The linker scripts showed code pages for ICD2 resources in program memory but for these devices the program memory is not used by the ICD2 debug executive.
      RAM resources used by the ICD2 were also incorrect for the 18F86J15 linker script.


      (27579)
      Every linker script used CONFIG as a label for the .config section but CONFIG is now an MPASM directive. The label defined in the linker script could no longer be used to access the .config section.


      (24706)
      Wrong calculation of memory utilization. The values present in the table "Program memory usage" and in "Section Info" were wrong.
      For example:
      rom unsigned char array[0x1fffD];
      
      This ROM variable should occupy 1fffD size in the ROM space, but the map file showed only fffD.


      (27970)
      In ICD2 linker scripts for the 18F45J10 family of devices, the address range was outside the range of the device so debug resources were not included.

    • Problems resolved between v4.00 and v4.01:

      (27612)
      18F4520 family device support changes needed to match data sheet DS39631A.
      For 18F4420/18F2420 corrected eedata range. Changed from 0xF00000-0xF003FF to 0xF00000-0xF000FF.


      (27628)
      16F690 family device support change needed to match data sheet DS41262A.
      Removed icd_inst, mfg_code and .device_id sections from linker scripts to be consistent with other devices.


      (27593)
      Linker scripts for PIC18F6525, PIC18F6621, PIC18F8525, PIC18F8621 needed to be updated. For ICD2 linker scripts, the debug exec changed so dbgspr moved from bank 12 to bank 14.


      (27618)
      18F87J10 family device support changes needed to match data sheet DS39663A. For 18F86J15 ICD2 linker scripts, dbgspr was incorrectly assigned to bank 7 but has been moved to bank 14.


    • Early adopter part support added between v4.05 and v4.06:
        12F609
        18F24K20
        18F44K20
      
    • Early adopter part support added between v4.04 and v4.05:
        16F610
      
    • Early adopter part support added between v4.03 and v4.04:
        12F615
        18F87J50
        18F86J50
        18F85J50
        18F67J50
        18F66J50
        18F65J50
        18F86J55
        18F66J55
        18F87J11
        18F86J11
        18F67J11
        18F66J11
        18F86J16
        18F66J16
      
    • Early adopter part support added between v4.02 and v4.03:
        18F2682
        18F4682
        18F63J11
        18F64J11
        18F65J11
        18F83J11
        18F84J11
        18F85J11
      
    • Early adopter part support added between v4.01 and v4.02:
        18F25K20
        18F2685
        18F45K20
        18F4685
        18F63J90
        18F64J90
        18F65J90
        18F83J90
        18F84J90
        18F85J90
        16F631
        16F677
        16F883
        16F884
        16F886
        16F887
      
    • Early adopter part support added between v4.00 and v4.01:
        16F616
        16HV616
        16HV785
      
  4. Command Line Device Options Supported

  5. 10F200       10F202       10F204       10F206
    10F220       10F222
    
    12C508       12C508A      12C509       12C509A
    12C671       12C672
    12CE518      12CE519      12CE673      12CE674
    12CR509A
    12F508       12F509       12F510       12F609
    12F615       12F629       12F635       12F675
    12F683
    12HV609*     12HV615*
    
    14000
    
    16C432       16C433       16C505       16C52
    16C54        16C54A       16C54B       16C54C
    16C55        16C554       16C557       16C558
    16C55A       16C56        16C56A       16C57
    16C57C       16C58A       16C58B
    16C5X
    16C61        16C62        16C620       16C620A
    16C621       16C621A      16C622       16C622A
    16C62A       16C62B       16C63        16C63A
    16C64        16C642       16C64A       16C65
    16C65A       16C65B       16C66        16C662
    16C67        16C71        16C710       16C711
    16C712       16C715       16C716       16C717
    16C72        16C72A       16C73        16C73A
    16C73B       16C74        16C745       16C747
    16C74A       16C74B       16C76        16C765
    16C77        16C770       16C771       16C773
    16C774       16C781       16C782       16C84
    16C923       16C924       16C925       16C926
    16CE623      16CE624      16CE625
    16CR54       16CR54A      16CR54B      16CR54C
    16CR56A      16CR57A      16CR57B      16CR57C
    16CR58A      16CR58B      16CR62       16CR620A
    16CR63       16CR64       16CR65       16CR72
    16CR83       16CR84
    16CXX
    16F505       16F506       16F54        16F57
    16F59        16F610       16F616       16F627
    16F627A      16F628       16F628A      16F630
    16F631       16F636       16F639       16F648A
    16F676       16F677       16F684       16F685
    16F687       16F688       16F689       16F690
    16F716       16F72        16F722*      16F723*
    16F724*      16F726*      16F727*      16F73
    16F737       16F74        16F76        16F767
    16F77        16F777       16F785       16F818
    16F819       16F83        16F84        16F84A
    16F87        16F870       16F871       16F872
    16F873       16F873A      16F874       16F874A
    16F876       16F876A      16F877       16F877A
    16F88        16F882*      16F883       16F884
    16F886       16F887       16F913       16F914
    16F916       16F917       16F946
    
    16HV540      16HV610*      16HV616      16HV785
    
    17C42        17C42A       17C43        17C44
    17C752       17C756       17C756A      17C762
    17C766
    17CR42       17CR43
    17CXX
    
    18C242+      18C252+      18C442+      18C452+
    18C601+      18C658+      18C801+      18C858+
    
    18F1220+     18F1230      18F1231      18F1320+
    18F1330      18F1331      18F2220+     18F2221
    18F2320+     18F2321      18F2331+     18F2410+
    18F242+      18F2420+     18F2423      18F2431+
    18F2439+     18F2450      18F2455+     18F2458*
    18F248+      18F2480+     18F24J10+    18F24K20
    18F2510+     18F2515+     18F252+      18F2520+
    18F2523      18F2525+     18F2539+     18F2550+
    18F2553*     18F258+      18F2580+     18F2585+
    18F25J10+    18F25K20     18F2610+     18F2620+
    18F2680+     18F2682      18F2685      18F4220+
    18F4221      18F4320+     18F4321      18F4331+
    18F4410+     18F442+      18F4420+     18F4423
    18F4431+     18F4439+     18F4450      18F4455+
    18F4458*     18F448+      18F4480+     18F44J10+
    18F44K20     18F4510+     18F4515+     18F452+
    18F4520+     18F4523      18F4525+     18F4539+
    18F4550+     18F4553*     18F458+      18F4580+
    18F4585+     18F45J10+    18F45K20     18F4610+
    18F4620+     18F4680+     18F4682      18F4685
    18F6310+     18F6390+     18F63J11     18F63J90
    18F6410+     18F6490+     18F64J11     18F64J15
    18F64J90     18F6520+     18F6525+     18F6527+
    18F6585+     18F65J10+    18F65J11     18F65J15+
    18F65J50     18F65J90     18F6620+     18F6621+
    18F6622+     18F6627+     18F6680+     18F66J10+
    18F66J11     18F66J15+    18F66J16     18F66J50
    18F66J55     18F66J60     18F66J65     18F6720+
    18F6722+     18F67J10+    18F67J11     18F67J50
    18F67J60     18F8310+     18F8390+     18F83J11
    18F83J90     18F8410+     18F8490+     18F84J11
    18F84J15     18F84J90     18F8520+     18F8525+
    18F8527+     18F8585+     18F85J10+    18F85J11
    18F85J15+    18F85J50     18F85J90     18F8620+
    18F8621+     18F8622+     18F8627+     18F8680+
    18F86J10+    18F86J11     18F86J15+    18F86J16
    18F86J50     18F86J55     18F86J60     18F86J65
    18F8720+     18F8722+     18F87J10+    18F87J11
    18F87J50     18F87J60     18F96J60     18F96J65
    18F97J60
    
    EEPROM16     EEPROM8
    
    RF509AF      RF509AG      RF675F       RF675H
    RF675K
    

    *Note: Early adopter support has been added for these devices since last release

    +Note: These are the only PIC18 devices with peripheral library support.

    THE PARTS CORRESPONDING TO THESE OPTIONS MAY NOT ALL BE COMMERCIALLY AVAILABLE.

    The part selection is specified at assembly time and contained within the object file. An appropriate linker command file is necessary to properly link for the chosen part.

  6. Operating System Support List

  7. Windows XP and Windows 2000

  8. Known Problems in v4.06

  9. (3224)
    MPLINK Linker always links in the section which loads initialized data from program memory to data memory, even though it is not required.


    (18214)
    If MPLINK.EXE is invoked without arguments, an error message stating "Error spawning _mplink.exe" is emitted. This message is spurious; it can be ignored.


    (18432)
    An interrupt with locals of "overlay" storage class which calls a function reachable from main is incorrectly viewed as recursive.
    For example, the program:
            int g (void) {
              return 2;
            }
    
            void f (void);
            #pragma interrupt f
            void f (void) {
              overlay int x;
              x = g ();
            }
    
            void main (void) {
              int x;
              x = g ();
            }
    
    Will cause a linker error, stating that 'g' is recursive and has locals of "overlay" storage class. The workaround is to use "auto" instead of "overlay" in the interrupt.


    (19225 / 24343)
    MPLINK Linker may generate an assertion failure on programs which contain a section of zero length. The workaround is to remove such sections from the program.


    (20403)
    The '/r' option of MP2HEX does not work correctly for ranges specified outside of any existing data.
    For example, given the following source, 't.asm':
            LIST P=12C508
            CODE 0x100
            MOVLW 0
            MOVLW 1
            MOVLW 2
            MOVLW 3
            END
    
    After assembly, execute 'mp2hex.exe t.o /r 0x104-0x104'. The hex file content is:
            :02 0000 04 0000FA
            :02 0206 00 030C E7
            :00 0000 01 FF
    
    The data record shows the instruction 'MOVLW 3' at address 0x103, but 0x103 was not specified in the range.
    Since no data exists at 0x104 in the COFF file, there should be no data bytes in the hex file.


    (22228)
    Quiet mode (/q) disables the printing of errors and warnings to standard out.


    (22947)
    The /? command-line option may give the following error message on Windows 2000:
            Error - unknown switch: /r
    
    Use the /h option instead.


    (27314)
    Program memory utilization is not correct in map files generated for 18F87J10.


    (28114)
    The linker may disregard the section information in the last IDATA due to CONFIG syntax directives.


    (22483)
    MPLIB is unable to work with MPLAB C18 files compiled in the static overlay model.
    For example, the source code:
            int add( int a, int b )
            {
               int c;
           
               c = a + b;
               return c;
            }
    
    can be compiled and archived with the commands:
            mcc18 test.c -sco
            mplib -c test.lib test.o
    
    However, attempting to list the files in the archive link the archive will result in the error:
            Error - Coff file 'test.o' could not read string table.
            Error - Could not build member 'test.o' in library file './test.lib'.
    
  10. Customer Support


    Microchip provides online support via our home page at:
    http://www.microchip.com

    Technical support is available through the web site at:
    http://support.microchip.com

    A forum for discussion of Microchip products and tools is available at:
    http://forum.microchip.com